import Koa from 'koa'
import {YacshyController} from '../../@yacshy/types/Interface'

import UsrController from './controller/user.controller'

const controllers = [UsrController]

export const injectController = (app: Koa) => {
    controllers.forEach((controller) => {
        class A extends YacshyController {
            
        }
        (UsrController as YacshyController).ROUTER
        const controllerInstance = new UsrController()
        const _ORIGIN_ = controllerInstance._ROUTER_
        app.use(_ORIGIN_.routes())
    })
}
